const Base = require('./base.js');
var webdriver = require('selenium-webdriver'),
    By = webdriver.By,
    until = webdriver.until;
module.exports = class extends Base {
  indexAction() {
    return this.display();
  }
  async newAction(){
    var driver = new webdriver.Builder()
    .forBrowser('chrome').setChromeService(service)
    .build();
    let obj={};
    obj.session=await driver.getSession();
    obj.url=await driver.service;
    this.body=obj;
    driver.get('https://www.baidu.com');
    // driver.wait(until.titleIs('webdriver_百度搜索'), 1000);
  }
  async doAction(){
     let driver =await WebDriver.attachToSession('a944458c46d31d4c345e9697875e9f6e');
     driver.get('http://www.sporttery.cn');
  }
};
